<?php /* Smarty version Smarty-3.1.12, created on 2013-04-15 22:08:03
         compiled from "D:\wamp\www\acps_new\templates\reports\protocol.tpl" */ ?>
<?php /*%%SmartyHeaderCode:92385150502ee13763-75084101%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c9311f6328d7a4ae12d347cefeb3dedf132e5ce6' => 
    array (
      0 => 'D:\\wamp\\www\\acps_new\\templates\\reports\\protocol.tpl',
      1 => 1366063681,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '92385150502ee13763-75084101',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_5150502ee15536_17174433',
  'variables' => 
  array (
    'data' => 0,
    'client' => 0,
    'user' => 0,
    'name' => 0,
    'recs' => 0,
    'record' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5150502ee15536_17174433')) {function content_5150502ee15536_17174433($_smarty_tpl) {?><script type="text/javascript">
    
    $(document).ready(function() {
        $("#selectedDate").datepicker({ 
            dateFormat: "dd/mm/yy",
            firstDay: 1      
        }); 
    });
    
</script>

<h2 class="pageTitle">Protocol about work execution and goods delivery</h2>

<div class="menu-list">
    <form action="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
?input=protocol" method="post">
        Client: &nbsp;
        <select size="1" name="selectedClient" onchange="userListOfClient(this.value)">
            <option value="">Please select</option>
            <?php  $_smarty_tpl->tpl_vars["client"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["client"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['clients']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["client"]->key => $_smarty_tpl->tpl_vars["client"]->value){
$_smarty_tpl->tpl_vars["client"]->_loop = true;
?>
                <option <?php if ($_SESSION['user']['user_type_id']!=@USER_TYPE_CLIENT&&$_smarty_tpl->tpl_vars['client']->value['bad_payer']==1){?>style="background: #ff545e"<?php }?> <?php if ($_smarty_tpl->tpl_vars['data']->value['prefill']['client']==$_smarty_tpl->tpl_vars['client']->value['klient_id']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['client']->value['klient_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['client']->value['name'];?>
</option>
            <?php } ?>
        </select>&nbsp;
        Date: &nbsp;
        <input name="selectedDate" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['prefill']['date'];?>
" type="text"  id="selectedDate" />
        User: &nbsp;
        <select id="selectedUser" size="1" name="selectedUser">
            <option value="">Please select</option>
            <?php  $_smarty_tpl->tpl_vars["user"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["user"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['users']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["user"]->key => $_smarty_tpl->tpl_vars["user"]->value){
$_smarty_tpl->tpl_vars["user"]->_loop = true;
?>
                <option <?php if ($_smarty_tpl->tpl_vars['data']->value['prefill']['user']==$_smarty_tpl->tpl_vars['user']->value['users_id']){?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['user']->value['users_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['user']->value['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['user']->value['surname'];?>
</option>
            <?php } ?>
        </select>&nbsp;
        <input type="submit" value="show" />
    </form>
</div>
<?php if (count($_smarty_tpl->tpl_vars['data']->value['records'])==0){?> 
    No records.
<?php }else{ ?>
    <div style="margin: 1em;">
        <a target="_blank" href="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
print.php?input=protocol&amp;selectedClient=<?php echo $_smarty_tpl->tpl_vars['data']->value['prefill']['client'];?>
&amp;selectedDate=<?php echo $_smarty_tpl->tpl_vars['data']->value['prefill']['date'];?>
&amp;selectedUser=<?php echo $_smarty_tpl->tpl_vars['data']->value['prefill']['user'];?>
" class="basicButton">Print this protocol</a>
    </div>
    <table class="protocol-list">
        <tr>
            <td colspan="6">
                <table style="width: auto">
                    <tr>
                        <td rowspan="4">
                            <img src="<?php echo $_smarty_tpl->tpl_vars['data']->value['root'];?>
images/alfac_no_text.png" width="200" />
                        </td>
                        <td colspan="2" style="padding-left: 10px;">
                            <h1 style="font-size: 18px; margin: 0px 0 5px 0; padding: 0">Alfa Centauri spol. s r.o.</h1>
                            Pri strelnici 3, 821 04 Bratislava<br/>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10px;">Tel.: + 421 243 427 175</td>
                        <td>Fax: + 421 243 427 175</td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10px;">Internet: www.alfac.sk </td>
                        <td>E-mail:  office@alfac.sk </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10px;">Kontaktná osoba:  <?php echo $_smarty_tpl->tpl_vars['data']->value['contact_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['data']->value['contact_info']['surname'];?>
</td>
                        <td>Email: <?php echo $_smarty_tpl->tpl_vars['data']->value['contact_info']['email'];?>
</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th colspan="6">
                <br/>
                <br/>
                
                
            </th>
        </tr>
        <tr>
            <th colspan="6" class="left-align">
        <h1 style="font-size: 18px; margin: 0px; padding: 0">PROTOKOL o vykonaní práce a dodaní tovaru</h1>
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <th colspan="6" class="left-align" style="font-size: 14px">
        Pre <?php echo $_smarty_tpl->tpl_vars['data']->value['client_info']['fullName'];?>
, IČO: <?php echo $_smarty_tpl->tpl_vars['data']->value['client_info']['ICO'];?>
<br/>
        Dátum: <?php echo $_smarty_tpl->tpl_vars['data']->value['prefill']['date'];?>

        <br/>
        <br/>
    </th>
</tr>
<?php  $_smarty_tpl->tpl_vars["recs"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["recs"]->_loop = false;
 $_smarty_tpl->tpl_vars["name"] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['data']->value['records']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["recs"]->key => $_smarty_tpl->tpl_vars["recs"]->value){
$_smarty_tpl->tpl_vars["recs"]->_loop = true;
 $_smarty_tpl->tpl_vars["name"]->value = $_smarty_tpl->tpl_vars["recs"]->key;
?>
    <tr>
        <td style="padding: 10px 0" colspan="6" class="left-align"><strong><?php echo $_smarty_tpl->tpl_vars['name']->value;?>
:</strong></td>
    </tr>
    <tr>
        <td class="left-align" style="color:#0F192A; width: 300px;">Popis</td>
        <td class="left-align" style="color:#0F192A">Množstvo</td>
        <td class="left-align" style="color:#0F192A">Jednotková cena</td>
        <td class="left-align" style="color:#0F192A">Cena bez DPH</td>
        <td class="left-align" style="color:#0F192A">Cena s DPH</td>
        <td class="left-align" style="color:#0F192A">Odovzdal</td>
    </tr>
    <?php  $_smarty_tpl->tpl_vars["record"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["record"]->_loop = false;
 $_smarty_tpl->tpl_vars["k"] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['recs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["record"]->key => $_smarty_tpl->tpl_vars["record"]->value){
$_smarty_tpl->tpl_vars["record"]->_loop = true;
 $_smarty_tpl->tpl_vars["k"]->value = $_smarty_tpl->tpl_vars["record"]->key;
?>
        <tr>
            <td class="left-align" style="width: 300px;"><?php echo $_smarty_tpl->tpl_vars['record']->value['description'];?>
</td>
            <td class="left-align"><?php echo $_smarty_tpl->tpl_vars['record']->value['amount'];?>
</td>
            <td class="left-align"><?php echo $_smarty_tpl->tpl_vars['record']->value['unit_price'];?>
 €</td>
            <td class="left-align"><?php echo $_smarty_tpl->tpl_vars['record']->value['withoutDph'];?>
 €</td>
            <td class="left-align"><?php echo $_smarty_tpl->tpl_vars['record']->value['withDph'];?>
 €</td>
            <td class="left-align"><?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['record']->value['user_info']['surname'];?>
</td>
        </tr>
    <?php } ?>
    <tr>
        <td colspan="3" class="left-align" style="border-top: 1px solid gray;color:#0F192A"><b>Suma - <?php echo $_smarty_tpl->tpl_vars['name']->value;?>
:</b></td>
        <td class="left-align" style="border-top: 1px solid gray;color:#0F192A"><b><?php echo $_smarty_tpl->tpl_vars['data']->value['sums'][$_smarty_tpl->tpl_vars['name']->value]['withoutDph'];?>
 €</b></td>
        <td class="left-align" style="border-top: 1px solid gray;color:#0F192A"><b><?php echo $_smarty_tpl->tpl_vars['data']->value['sums'][$_smarty_tpl->tpl_vars['name']->value]['withDph'];?>
 €</b></td>
        <td class="left-align" style="border-top: 1px solid gray;color:#0F192A"></td>
    </tr>
<?php } ?>
<tr>
    <th colspan="6" class="left-align">
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <td colspan="3" class="left-align" style="font-size: 14px; padding: 10px 0;"><b>Celková suma:</b></td>
    <td class="left-align" style="font-size: 14px; padding: 10px 0; "><b><?php echo $_smarty_tpl->tpl_vars['data']->value['total_sums']['withoutDph'];?>
 €</b></td>
    <td class="left-align" style="font-size: 14px; padding: 10px 0; "><b><?php echo $_smarty_tpl->tpl_vars['data']->value['total_sums']['withDph'];?>
  €</b></td>
    <td class="left-align" style="font-size: 14px; padding: 10px 0; "></td>
</tr>
<tr>
    <th colspan="6" class="left-align">
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <td colspan="3">
        <b>Odovzdal:</b><br/>
        Meno a priezvisko: <?php echo $_SESSION['user']['profile']['name'];?>
 <?php echo $_SESSION['user']['profile']['surname'];?>
 
    </td>
    <td colspan="3">
        <b>Prevzal/a:</b><br/>
        Meno a priezvisko: <?php echo $_smarty_tpl->tpl_vars['data']->value['user_info']['name'];?>
 <?php echo $_smarty_tpl->tpl_vars['data']->value['user_info']['surname'];?>

    </td>
</tr>
<tr>
    <th colspan="6" class="left-align">
        <br/>
        <br/>
    </th>
</tr>
<tr>
    <td colspan="3"><br/>Podpis: ................................................</td>
    <td colspan="3"><br/>Podpis: ................................................</td>
</tr>
</table>
<?php }?> 
<?php }} ?>